package com.hospital;

import java.util.ArrayList;
import java.util.Scanner;
/*循环模板，抽象类模板方法使用 */
public abstract class LoopTemplate {

    public abstract void loopContent(int type,ArrayList<Department> departments);

    public void template(ArrayList<Department> departments) {
      Scanner sc = new Scanner(System.in);
      while (true) {
            int type = sc.nextInt();
            this.loopContent(type,departments);
        }
    }
}
